<!--
 * @description: 新增提现记录
 * @Author: latiao
 * @Date: 2021-11-09 09:00:12
 * @LastEditors: vikingShip
 * @LastEditTime: 2021-11-30 15:39:18
-->
<template>
<view class="withdrawals--record">
  <item v-for="(value,key) in group" :key="key" :date="key" :list="value"></item>
  <block v-if="list.length>=10">
    <view class="center mt-20" v-if="haveMore">
      <!-- <image src='/images/loading.gif' style="width:40rpx;height:40rpx"></image> -->
      <view class="ml-20 fs-26 fc-91">正在加载数据...</view>
    </view>
    <view class="center fc-8c fs-24" v-else>-- 到底了~ --</view>
  </block>
  <block v-if="list.length==0">
    <data-empty :infoVisible="false" tips="暂无任何记录~"></data-empty>
  </block>
</view>
</template>
<script lang='ts'>
import { Component,Mixins } from 'vue-property-decorator'
import withdrawals from "@/mixins/withdrawals";
import item from "./item/item.vue"
import {userIdGet} from "@/api/modules/user";
@Component({
  components:{
    item
  }
})
export default class WithdrawalsRecord extends Mixins(withdrawals) {
    /** 根据提现年月所得的分组 */
    group:any={}
    list:Array<any>=[]
    isLast:boolean=false
    getWithdrawalList:any
      async onLoad({ accountType = "USER", type = 0, }) {
     userIdGet({}).then(id=>{
       this.getWithdrawalList(
         { accountType, type, userId:id},
         false,
       );   
     })
  }
}
</script>
<style lang="scss" scoped>
.withdrawals--record {
  width: 100%;
  height: auto;
  font-size: 30rpx;
}
</style>